<%@ page import="java.util.*" %>
<%

	Enumeration headerNames = request.getHeaderNames();
	while(headerNames.hasMoreElements()) {
	  String headerName = (String)headerNames.nextElement();
	  System.out.println("HEADERNAME:" + headerName);
	  System.out.println("REQUEST:" + request.getHeader(headerName));
	}
	if (session.getAttribute("username") == null) {
		pageContext.forward("/login.jsp");
	}else{
		response.sendRedirect(request.getHeader("referer"));
	}
%>